<template>
  <div class="userbrokeragerecord-page page-main">
    <search-form :model="searchParams" @search="search">
      <a-form-item label="名称" name="prop">
        <a-input v-model:value="searchParams.prop" placeholder="请输入" />
      </a-form-item>
    </search-form>
    <g-table
      ref="tableRef"
      :columns="columns"
      :api="getPageList"
      :params="searchParams"
    />

    、
  </div>
</template>

<script setup lang="tsx">
import { getPageList } from "./api";
import type { Iuserbrokeragerecord } from "./entity";

const searchParams = reactive({
  prop: "",
});

let visible = $ref(false);

const { tableRef, columns, search } = useTable<Iuserbrokeragerecord>([
  { title: "ID", dataIndex: "id" },
  {
    title: "佣金变动",
    dataIndex: "price",
    customRender: ({ record }) => (
      <>
        <span class={record.type == 1 ? "color_red" : "color_green"}>
          {record.price}
        </span>
      </>
    ),
  },
  { title: "变动信息", dataIndex: "mark" },
  { title: "变动类型", dataIndex: "title" },
  { title: "用户信息", dataIndex: "userName" },

  { title: "更新时间", dataIndex: "updateTime" },
]);

let activeRow = $ref<Partial<Iuserbrokeragerecord>>({});
</script>

<style lang="scss"></style>
